package com.example.exam.service;


import com.example.exam.pojo.DTO.ExamPaperAnswerDTO.ExamPaperAnswerUpdate;
import com.example.exam.pojo.DTO.ExamPaperAnswerDTO.ExamPaperSubmitItemDTO;
import com.example.exam.pojo.entity.TExamPaperQuestionCustomerAnswer;

import java.util.List;

public interface ICustomerAnswerService {

    /**
     * 将试卷问题的答题信息转成DTO传给前端
     * @param customerAnswer
     * @return
     */
    ExamPaperSubmitItemDTO getCustomerAnswer(TExamPaperQuestionCustomerAnswer customerAnswer);

    /**
     * 根据用户答卷的ID查找答卷
     * @param id
     * @return
     */
    TExamPaperQuestionCustomerAnswer selectById(Integer id);

    /**
     *根据试卷答案ID查找用户题目答案列表
     * @param id
     * @return
     */
    List<TExamPaperQuestionCustomerAnswer> listByPaperAnswerId(Integer id);

    /**
     * 更新用户的成绩
     * @param examPaperAnswerUpdates
     * @return
     */
    int updateScore(List<ExamPaperAnswerUpdate> examPaperAnswerUpdates);

}
